; generated by ARM C/C++ Compiler, 4.1 [Build 481]
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o..\OUT\stm32f10x_pwr.o --depend=..\OUT\stm32f10x_pwr.d --cpu=Cortex-M3 --apcs=interwork -O0 -I..\Libraries\inc -I..\CMSIS -I..\users -I..\Libraries\src -I..\Libraries\sys -I..\COMM -I..\MOD -I..\CAN -IC:\Keil\ARM\INC -IC:\Keil\ARM\INC\ST\STM32F10x -D__MICROLIB -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER --omf_browse=..\OUT\stm32f10x_pwr.crf ..\Libraries\src\stm32f10x_pwr.c]
                          THUMB

                          AREA ||i.PWR_BackupAccessCmd||, CODE, READONLY, ALIGN=2

                  PWR_BackupAccessCmd PROC
;;;123      */
;;;124    void PWR_BackupAccessCmd(FunctionalState NewState)
000000  4901              LDR      r1,|L1.8|
;;;125    {
;;;126      /* Check the parameters */
;;;127      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;128      *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState;
000002  6208              STR      r0,[r1,#0x20]
;;;129    }
000004  4770              BX       lr
;;;130    
                          ENDP

000006  0000              DCW      0x0000
                  |L1.8|
                          DCD      0x420e0000

                          AREA ||i.PWR_ClearFlag||, CODE, READONLY, ALIGN=2

                  PWR_ClearFlag PROC
;;;286      */
;;;287    void PWR_ClearFlag(uint32_t PWR_FLAG)
000000  4903              LDR      r1,|L2.16|
;;;288    {
;;;289      /* Check the parameters */
;;;290      assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG));
;;;291             
;;;292      PWR->CR |=  PWR_FLAG << 2;
000002  6809              LDR      r1,[r1,#0]
000004  ea410180          ORR      r1,r1,r0,LSL #2
000008  4a01              LDR      r2,|L2.16|
00000a  6011              STR      r1,[r2,#0]
;;;293    }
00000c  4770              BX       lr
;;;294    
                          ENDP

00000e  0000              DCW      0x0000
                  |L2.16|
                          DCD      0x40007000

                          AREA ||i.PWR_DeInit||, CODE, READONLY, ALIGN=1

                  PWR_DeInit PROC
;;;111      */
;;;112    void PWR_DeInit(void)
000000  b510              PUSH     {r4,lr}
;;;113    {
;;;114      RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, ENABLE);
000002  2101              MOVS     r1,#1
000004  0708              LSLS     r0,r1,#28
000006  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;115      RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, DISABLE);
00000a  2100              MOVS     r1,#0
00000c  f04f5080          MOV      r0,#0x10000000
000010  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;116    }
000014  bd10              POP      {r4,pc}
;;;117    
                          ENDP


                          AREA ||i.PWR_EnterSTANDBYMode||, CODE, READONLY, ALIGN=2

                  PWR_EnterSTANDBYMode PROC
;;;235      */
;;;236    void PWR_EnterSTANDBYMode(void)
000000  480b              LDR      r0,|L4.48|
;;;237    {
;;;238      /* Clear Wake-up flag */
;;;239      PWR->CR |= PWR_CR_CWUF;
000002  6800              LDR      r0,[r0,#0]
000004  f0400004          ORR      r0,r0,#4
000008  4909              LDR      r1,|L4.48|
00000a  6008              STR      r0,[r1,#0]
;;;240      /* Select STANDBY mode */
;;;241      PWR->CR |= PWR_CR_PDDS;
00000c  4608              MOV      r0,r1
00000e  6800              LDR      r0,[r0,#0]
000010  f0400002          ORR      r0,r0,#2
000014  6008              STR      r0,[r1,#0]
;;;242      /* Set SLEEPDEEP bit of Cortex System Control Register */
;;;243      SCB->SCR |= SCB_SCR_SLEEPDEEP;
000016  4807              LDR      r0,|L4.52|
000018  6800              LDR      r0,[r0,#0]
00001a  f0400004          ORR      r0,r0,#4
00001e  f04f21e0          MOV      r1,#0xe000e000
000022  f8c10d10          STR      r0,[r1,#0xd10]
;;;244    /* This option is used to ensure that store operations are completed */
;;;245    #if defined ( __CC_ARM   )
;;;246      __force_stores();
000026  bf00              NOP      
000028  bf00              NOP      
;;;247    #endif
;;;248      /* Request Wait For Interrupt */
;;;249      __WFI();
00002a  bf30              WFI      
;;;250    }
00002c  4770              BX       lr
;;;251    
                          ENDP

00002e  0000              DCW      0x0000
                  |L4.48|
                          DCD      0x40007000
                  |L4.52|
                          DCD      0xe000ed10

                          AREA ||i.PWR_EnterSTOPMode||, CODE, READONLY, ALIGN=2

                  PWR_EnterSTOPMode PROC
;;;196      */
;;;197    void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)
000000  b510              PUSH     {r4,lr}
;;;198    {
000002  4602              MOV      r2,r0
;;;199      uint32_t tmpreg = 0;
000004  2000              MOVS     r0,#0
;;;200      /* Check the parameters */
;;;201      assert_param(IS_PWR_REGULATOR(PWR_Regulator));
;;;202      assert_param(IS_PWR_STOP_ENTRY(PWR_STOPEntry));
;;;203      
;;;204      /* Select the regulator state in STOP mode ---------------------------------*/
;;;205      tmpreg = PWR->CR;
000006  4b0e              LDR      r3,|L5.64|
000008  6818              LDR      r0,[r3,#0]
;;;206      /* Clear PDDS and LPDS bits */
;;;207      tmpreg &= CR_DS_MASK;
00000a  f0200003          BIC      r0,r0,#3
;;;208      /* Set LPDS bit according to PWR_Regulator value */
;;;209      tmpreg |= PWR_Regulator;
00000e  4310              ORRS     r0,r0,r2
;;;210      /* Store the new value */
;;;211      PWR->CR = tmpreg;
000010  6018              STR      r0,[r3,#0]
;;;212      /* Set SLEEPDEEP bit of Cortex System Control Register */
;;;213      SCB->SCR |= SCB_SCR_SLEEPDEEP;
000012  4b0c              LDR      r3,|L5.68|
000014  681b              LDR      r3,[r3,#0]
000016  f0430304          ORR      r3,r3,#4
00001a  f04f24e0          MOV      r4,#0xe000e000
00001e  f8c43d10          STR      r3,[r4,#0xd10]
;;;214      
;;;215      /* Select STOP mode entry --------------------------------------------------*/
;;;216      if(PWR_STOPEntry == PWR_STOPEntry_WFI)
000022  2901              CMP      r1,#1
000024  d101              BNE      |L5.42|
;;;217      {   
;;;218        /* Request Wait For Interrupt */
;;;219        __WFI();
000026  bf30              WFI      
000028  e000              B        |L5.44|
                  |L5.42|
;;;220      }
;;;221      else
;;;222      {
;;;223        /* Request Wait For Event */
;;;224        __WFE();
00002a  bf20              WFE      
                  |L5.44|
;;;225      }
;;;226      
;;;227      /* Reset SLEEPDEEP bit of Cortex System Control Register */
;;;228      SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP);  
00002c  4b05              LDR      r3,|L5.68|
00002e  681b              LDR      r3,[r3,#0]
000030  f0230304          BIC      r3,r3,#4
000034  f04f24e0          MOV      r4,#0xe000e000
000038  f8c43d10          STR      r3,[r4,#0xd10]
;;;229    }
00003c  bd10              POP      {r4,pc}
;;;230    
                          ENDP

00003e  0000              DCW      0x0000
                  |L5.64|
                          DCD      0x40007000
                  |L5.68|
                          DCD      0xe000ed10

                          AREA ||i.PWR_GetFlagStatus||, CODE, READONLY, ALIGN=2

                  PWR_GetFlagStatus PROC
;;;260      */
;;;261    FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG)
000000  4601              MOV      r1,r0
;;;262    {
;;;263      FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;264      /* Check the parameters */
;;;265      assert_param(IS_PWR_GET_FLAG(PWR_FLAG));
;;;266      
;;;267      if ((PWR->CSR & PWR_FLAG) != (uint32_t)RESET)
000004  4a03              LDR      r2,|L6.20|
000006  6852              LDR      r2,[r2,#4]
000008  420a              TST      r2,r1
00000a  d001              BEQ      |L6.16|
;;;268      {
;;;269        bitstatus = SET;
00000c  2001              MOVS     r0,#1
00000e  e000              B        |L6.18|
                  |L6.16|
;;;270      }
;;;271      else
;;;272      {
;;;273        bitstatus = RESET;
000010  2000              MOVS     r0,#0
                  |L6.18|
;;;274      }
;;;275      /* Return the flag status */
;;;276      return bitstatus;
;;;277    }
000012  4770              BX       lr
;;;278    
                          ENDP

                  |L6.20|
                          DCD      0x40007000

                          AREA ||i.PWR_PVDCmd||, CODE, READONLY, ALIGN=2

                  PWR_PVDCmd PROC
;;;136      */
;;;137    void PWR_PVDCmd(FunctionalState NewState)
000000  4901              LDR      r1,|L7.8|
;;;138    {
;;;139      /* Check the parameters */
;;;140      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;141      *(__IO uint32_t *) CR_PVDE_BB = (uint32_t)NewState;
000002  6108              STR      r0,[r1,#0x10]
;;;142    }
000004  4770              BX       lr
;;;143    
                          ENDP

000006  0000              DCW      0x0000
                  |L7.8|
                          DCD      0x420e0000

                          AREA ||i.PWR_PVDLevelConfig||, CODE, READONLY, ALIGN=2

                  PWR_PVDLevelConfig PROC
;;;157      */
;;;158    void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel)
000000  4601              MOV      r1,r0
;;;159    {
;;;160      uint32_t tmpreg = 0;
000002  2000              MOVS     r0,#0
;;;161      /* Check the parameters */
;;;162      assert_param(IS_PWR_PVD_LEVEL(PWR_PVDLevel));
;;;163      tmpreg = PWR->CR;
000004  4a03              LDR      r2,|L8.20|
000006  6810              LDR      r0,[r2,#0]
;;;164      /* Clear PLS[7:5] bits */
;;;165      tmpreg &= CR_PLS_MASK;
000008  f02000e0          BIC      r0,r0,#0xe0
;;;166      /* Set PLS[7:5] bits according to PWR_PVDLevel value */
;;;167      tmpreg |= PWR_PVDLevel;
00000c  4308              ORRS     r0,r0,r1
;;;168      /* Store the new value */
;;;169      PWR->CR = tmpreg;
00000e  6010              STR      r0,[r2,#0]
;;;170    }
000010  4770              BX       lr
;;;171    
                          ENDP

000012  0000              DCW      0x0000
                  |L8.20|
                          DCD      0x40007000

                          AREA ||i.PWR_WakeUpPinCmd||, CODE, READONLY, ALIGN=2

                  PWR_WakeUpPinCmd PROC
;;;177      */
;;;178    void PWR_WakeUpPinCmd(FunctionalState NewState)
000000  4901              LDR      r1,|L9.8|
;;;179    {
;;;180      /* Check the parameters */
;;;181      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;182      *(__IO uint32_t *) CSR_EWUP_BB = (uint32_t)NewState;
000002  6008              STR      r0,[r1,#0]
;;;183    }
000004  4770              BX       lr
;;;184    
                          ENDP

000006  0000              DCW      0x0000
                  |L9.8|
                          DCD      0x420e00a0
